﻿using System;
using System.Data;
using System.Data.DBLib;

namespace SysOperationLayer.DBHandle
{
    public class CodeDB : DBBase
    {
        public CodeDB()
        {
        }

        public CodeDB(CSqlDB objDB)
        {
            m_objDB = objDB;
        }

        public DataTable GetInfo(string strType)
        {
            if (ConnectDB())
            {
                string strSql = "select * from Code where Type='";
                strSql += strType;
                strSql += "'";
                return m_objDB.getDataTable(strSql, "Code");
            }

            m_strMessage = "Cannot Connect to the Database!";
            return null;
        }

        public DataTable getProjectTypeList()
        {
            return GetInfo("PT");
        }
    }
}
